package com.ruoyi.buss.grade.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.buss.grade.mapper.DataCustGradeConditionMapper;
import com.ruoyi.buss.grade.domain.DataCustGradeCondition;
import com.ruoyi.buss.grade.service.IDataCustGradeConditionService;

/**
 * 自定义查询条件方案(二期字段更新)Service业务层处理
 * 
 * @author sxy
 * @date 2021-07-16
 */
@Service
public class DataCustGradeConditionServiceImpl implements IDataCustGradeConditionService 
{
    @Autowired
    private DataCustGradeConditionMapper dataCustGradeConditionMapper;

    /**
     * 查询自定义查询条件方案(二期字段更新)
     * 
     * @param planCode 自定义查询条件方案(二期字段更新)ID
     * @return 自定义查询条件方案(二期字段更新)
     */
    @Override
    public DataCustGradeCondition selectDataCustGradeConditionById(String planCode)
    {
        return dataCustGradeConditionMapper.selectDataCustGradeConditionById(planCode);
    }

    /**
     * 查询自定义查询条件方案(二期字段更新)列表
     * 
     * @param dataCustGradeCondition 自定义查询条件方案(二期字段更新)
     * @return 自定义查询条件方案(二期字段更新)
     */
    @Override
    public List<DataCustGradeCondition> selectDataCustGradeConditionList(DataCustGradeCondition dataCustGradeCondition)
    {
        return dataCustGradeConditionMapper.selectDataCustGradeConditionList(dataCustGradeCondition);
    }

    /**
     * 新增自定义查询条件方案(二期字段更新)
     * 
     * @param dataCustGradeCondition 自定义查询条件方案(二期字段更新)
     * @return 结果
     */
    @Override
    public int insertDataCustGradeCondition(DataCustGradeCondition dataCustGradeCondition)
    {
        dataCustGradeCondition.setCreateTime(DateUtils.getNowDate());
        return dataCustGradeConditionMapper.insertDataCustGradeCondition(dataCustGradeCondition);
    }

    /**
     * 修改自定义查询条件方案(二期字段更新)
     * 
     * @param dataCustGradeCondition 自定义查询条件方案(二期字段更新)
     * @return 结果
     */
    @Override
    public int updateDataCustGradeCondition(DataCustGradeCondition dataCustGradeCondition)
    {
        return dataCustGradeConditionMapper.updateDataCustGradeCondition(dataCustGradeCondition);
    }

    /**
     * 批量删除自定义查询条件方案(二期字段更新)
     * 
     * @param planCodes 需要删除的自定义查询条件方案(二期字段更新)ID
     * @return 结果
     */
    @Override
    public int deleteDataCustGradeConditionByIds(String[] planCodes)
    {
        return dataCustGradeConditionMapper.deleteDataCustGradeConditionByIds(planCodes);
    }

    /**
     * 删除自定义查询条件方案(二期字段更新)信息
     * 
     * @param planCode 自定义查询条件方案(二期字段更新)ID
     * @return 结果
     */
    @Override
    public int deleteDataCustGradeConditionById(String planCode)
    {
        return dataCustGradeConditionMapper.deleteDataCustGradeConditionById(planCode);
    }
}
